package com.pzc.service;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.luojun.entity.Car;
import com.luojun.entity.User;
import com.luojun.util.HibernateUtil;
import com.pzc.dao.ManageDao;
import com.pzc.entity.PersonManage;

public class PersonManageService {

	ManageDao manageDao = new ManageDao();
	Session session = null;
	Transaction transaction = null;
	
	public boolean updateProduct(PersonManage pm) {
		
		return false;
	}

	public void  updateManage(PersonManage pm ) {
		System.out.println(pm+".........");
		manageDao.updateManage(pm);
		
	}
	
	public List<PersonManage> find(){
		session =HibernateUtil.getCurrentSession();
		transaction = session.beginTransaction();
		List<PersonManage> list = manageDao.find();
		transaction.commit();
		return list;
	}
	public void del(int id){
		manageDao.del(id);
	}
	public PersonManage selectManage(int userId){
		return manageDao.selectManage(userId);
	}
}
